import request from '@/utils/request';
import {product} from "./base";
export function fetchList(params) {
  return request({
    url: product + '/brand/listAll',
    method:'get',
    params:params
  })
}

export function getPage(params) {
  return request({
    url: product + '/brand/getPage',
    method:'get',
    params:params
  })
}

export function createBrand(data) {
  return request({
    url: product + '/brand/create',
    method:'post',
    data:data
  })
}
export function updateShowStatus(data) {
  return request({
    url: product + '/brand/update/showStatus',
    method:'post',
    data:data
  })
}

export function updateFactoryStatus(data) {
  return request({
    url: product + '/brand/update/factoryStatus',
    method:'post',
    data:data
  })
}

export function deleteBrand(id) {
  return request({
    url: product + '/brand/delete/'+id,
    method:'get',
  })
}

export function getBrand(id) {
  return request({
    url: product + '/brand/'+id,
    method:'get',
  })
}

export function updateBrand(id,data) {
  return request({
    url: product + '/brand/updateBrand/'+id,
    method:'post',
    data:data
  })
}

